home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 19.zip / BS1 part 19 / how to learn assembler.adf / CH5 / 5_3D_fire_but.asm < prev    next >
Assembly Source File  |  1988-02-25  |  429b  |  19 lines

  1. ;(5.3D)  fire button test & joy   difference
  2.  
  3. test:
  4.        jsr     run     ;test subroutine
  5.        tst.b   $bfe001 ;test for fire button
  6.        bpl     fire    ;end if fire button pressed       jmp     test    ;continue until broken
  7.        nop             ;Breakpoint here
  8.  
  9.  
  10. joy = $dff00C
  11. run:
  12.   move    d7,d6    ;old position in d6
  13.   move    joy,d7   ;new position in d7
  14.   sub     d7,d6    ;difference in d6  rts
  15.  
  16. fire:
  17.  end
  18.  
  19.